import os
from pathlib import Path
import logging
import glob
import shutil

Logger = logging.getLogger(__name__)
FORMAT = '%(asctime)s %(lineno)d %(message)s'
logging.basicConfig(format=FORMAT)
Logger.setLevel(logging.DEBUG)


def kitty_config(config, kitty_path):
    for conf in glob.glob(f"{config}/*.conf"):
        Logger.debug(f"Copy {conf} to {kitty_path}")
        shutil.copy(conf, kitty_path)


if __name__ == "__main__":
    paths = Path(__file__).parent
    kitty_path = Path(os.environ['HOME']).joinpath('.config', 'kitty')
    kitty_config(paths, kitty_path)
